﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Presentation/Admin.Master" AutoEventWireup="true"
    CodeBehind="QuanLyTaiKhoan.aspx.cs" Inherits="DoAn.Admin.QuanLy" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style3
        {
            width: 251px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style1" width="950">
        <tr>
            <td align="right">
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                <table class="style1">
                    <tr>
                        <td align="left" class="style3">
                            <asp:Button ID="btnChiTiet" runat="server" Text="Thêm mới" 
                                CausesValidation="False" OnClick="btnChiTiet_Click" />
                            <asp:Button ID="btnAn" runat="server" Text="Ẩn chi tiết" 
                                CausesValidation="False" OnClick="btnAn_Click" Visible="False" />
                        </td>
                        <td align="right">
                            <asp:TextBox ID="TextBox1" runat="server" CssClass="big" Width="197px"></asp:TextBox>
                            <asp:DropDownList ID="DropDownList1" runat="server" CssClass="big" Width="140px">
                            </asp:DropDownList>
                            <asp:Button ID="Button5" runat="server" CssClass="big" Text="Tìm Kiếm" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" Visible="False">
                    <ContentTemplate>
                        <asp:Label ID="Label1" runat="server" Text="CHI TIẾT TÀI KHOẢN"></asp:Label>
                        <br />
                        <table align="left" class="style1" width="300">
                            <tr>
                                <td align="right" class="style16" width="200">
                                    <asp:Label ID="lbID" runat="server" Text="ID:"></asp:Label>
                                    &nbsp;
                                </td>
                                <td width="200" class="style16">
                                    <asp:Label ID="lbMAND" runat="server" Text="Label"></asp:Label>
                                </td>
                                <td class="style17">
                                    &nbsp;
                                </td>
                                <td valign="top" rowspan="8">
                                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" Height="43px" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" class="style18" width="200">
                                    <asp:Label ID="Label2" runat="server" Text="Tên Đăng Nhập:"></asp:Label>
                                </td>
                                <td width="200" class="style18">
                                    <asp:TextBox ID="txtTen" runat="server" CssClass="big"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTen"
                                        ErrorMessage="Tên đăng nhập bị trống" ForeColor="Red">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label8" runat="server" Text="Mật Khẩu:"></asp:Label>
                                </td>
                                <td class="style11">
                                    <asp:TextBox ID="txtMatKhau" runat="server" CssClass="big" ReadOnly="True" TextMode="Password"></asp:TextBox>
                                    <br />
                                    <asp:CheckBox ID="cbMatKhau" runat="server" OnCheckedChanged="cbMatKhau_CheckedChanged"
                                        Text="Sửa" AutoPostBack="True" />
                                </td>
                                <td>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtMatKhau"
                                        ErrorMessage="Mật khẩu bị trống" ForeColor="Red">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label3" runat="server" Text="Email:"></asp:Label>
                                </td>
                                <td class="style16">
                                    <asp:TextBox ID="txtEmail" runat="server" CssClass="big"></asp:TextBox>
                                </td>
                                <td class="style17">
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtEmail"
                                        ErrorMessage="Email bị trống" ForeColor="Red">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label4" runat="server" Text="Loại Tài Khoản:"></asp:Label>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlLoaiTaiKhoan" runat="server" CssClass="big" Width="160px">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right" class="style16">
                                    <asp:Label ID="Label5" runat="server" Text="Ngày Tạo:"></asp:Label>
                                </td>
                                <td class="style16">
                                    <asp:TextBox ID="txtNgayTao" runat="server" CssClass="big"></asp:TextBox>
                                    <asp:CalendarExtender ID="txtNgayTao_CalendarExtender" runat="server" Format="mm/dd/yyyy"
                                        TargetControlID="txtNgayTao">
                                    </asp:CalendarExtender>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label6" runat="server" Text="Kích Hoạt:"></asp:Label>
                                    <br />
                                    <asp:Label ID="lbBiXoa" runat="server" Text="Bị Xoá:" Visible="False"></asp:Label>
                                </td>
                                <td>
                                    <asp:CheckBox ID="cbKichHoat" runat="server" />
                                    <br />
                                    <asp:CheckBox ID="cbBiXoa" runat="server" Visible="False" />
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:Button ID="btnThem" runat="server" CssClass="style5" OnClick="btnThem_Click"
                                        Text="Thêm" Visible="False" />
                                    <asp:Button ID="btnReset" runat="server" CssClass="style5" OnClick="btnReset_Click"
                                        Text="Làm mới" Visible="False" CausesValidation="False" />
                                    <asp:Button ID="btnXoa" runat="server" CssClass="style5" Text="Xoá" OnClick="btnXoa_Click"
                                        CausesValidation="False" Visible="False" />
                                    <asp:Button ID="btnCapNhat" runat="server" CssClass="style5" Text="Cập nhật" OnClick="btnCapNhat_Click"
                                        Visible="False" />
                                </td>
                                <td class="style6">
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <br />
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="gvTaiKhoan" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    GridLines="None" Width="950px" OnSelectedIndexChanged="gvTaiKhoan_SelectedIndexChanged"
                    OnRowEditing="gvTaiKhoan_RowEditing" OnRowDeleted="gvTaiKhoan_RowDeleted">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="MAND" HeaderText="ID" />
                        <asp:BoundField DataField="TENDANGNHAP" HeaderText="Tên Đăng Nhập" />
                        <asp:BoundField DataField="MATKHAU" HeaderText="Mật Khẩu" />
                        <asp:BoundField DataField="EMAIL" HeaderText="Email" />
                        <asp:BoundField DataField="MALND" HeaderText="Mã Loại TK" />
                        <asp:BoundField DataField="TENLND" HeaderText="Tên Loại TK" />
                        <asp:BoundField DataField="NGAYTAO" HeaderText="Ngày Tạo" />
                        <asp:TemplateField HeaderText="Kích Hoạt" ShowHeader="false">
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="chkKichHoat" Checked='<%#Eval("KICHHOAT") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Bị Xoá" ShowHeader="false">
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="chkBiXoa" Checked='<%#Eval("BIXOA") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField SelectText="Chi tiết" ShowSelectButton="True" />
                    </Columns>
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                </asp:GridView>
            </td>
        </tr>
    </table>
    <br />
</asp:Content>
